//商品管理-商品即秒排期-配置文件
App.util.ns('Admin.Goods.JmPartitionGoods');
Admin.Goods.JmPartitionGoods.Conf = {
    columns: [
        {name: '商品', width: '200px', value: function(item){
            return item.goods ? item.goods.name : '未分配';
        }},
        {name: '分区名', width: '120px', value: function(item){
            return item.jmpartition ? item.jmpartition.name : '未分配';
        }},
        {name: '创建日期', width: '80px', value: function(item){
            return App.util.formator.date(item.created_at);
        }}
    ],
    form: [
        {type: 'hidden', name: 'id'},
        {type: 'selectLists', name: 'goods_id', title: '商品', required: true,
            data_id: 'id',
            data_name: function(item){
                return item.id+':'+item.name;
            },
            dataTable: {
                baseUrl: '/admin/goods/goods',
                dataUrl: 'lists?status=1',
                data_id: 'id',
                data_name: 'name',
                table: {
                    id: 'id',
                    main: 0,
                    columns: [
                        {name: '商品名', value: 'name'}
                    ]
                },
                filter: [
                    {type: 'keywords'}
                ],
                height: '720px'
            }
        }
    ]
};